﻿using System.Web.Mvc;
using System.Web.Routing;

namespace IceDog.DNF.Program.Mvc5
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            //routes.RouteExistingFiles = true;
            //routes.IgnoreRoute("{file}.js");
            
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
            //这和写在MovieAreaRegistration里面的效果一致
            //routes.MapRoute("Hello", "Movie/{controller}/{action}/{name}/{id}", new { controller = "HelloWorld", action = "Index", id = UrlParameter.Optional });

        }
    }
}
